import HTTP from '@/http/http'
const centerApi = import.meta.env.VITE_BASE_URL
class Api extends HTTP {
  // 查询市级信息
  getCityList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/area/getCityList`,
      params
    })
  }
  // 查询县区级信息
  getCountyList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/area/getCountyList`,
      params
    })
  }
  // 导出历史火点Excel列表
  exportHistoryRealExcel(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/exportHistoryRealExcel`,
      params,
      responseType: 'arraybuffer'
    })
  }
  // 按时间范围查询各火点历史实况列表
  getForestryStationHistoryRealList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/getForestryStationHistoryRealList`,
      params
    })
  }
  // 获得最新实况监测火点列表(半小时轮询)
  getNewestFirePointList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/getNewestFirePointList`,
      params
    })
  }
  // 获得山西所有格点未来n天森林火险等级预报文件路径
  getGridPointForestFireDangerLevel(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/getGridPointForestFireDangerLevel`,
      params
    })
  }
  // 获取林局区域范围坐标
  getForestBureauArea(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/getForestBureauArea`,
      params
    })
  }
  // 获取林场信息
  getForestFarm(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/getForestFarm`,
      params
    })
  }
}
export default new Api()
